Skip to content

Conversation

@MiCKov3r
Copy link
Contributor

Hi, I made a small fix in the code, in case someone wants to do maintenance on the live environment and needs to disable login/editing. The setting is done via the CONFIG file, so it doesn't need to change the localization.

CONFIG.PHP

return [
'maintenance' => 'Oops! Under maintenance.'
];

This setting is checked

  • when logging in, it just hides the login window
  • when checking the role, function isAllowed
  • displaying a 401 error, where information about system maintenance is added

What do you think about it?
Resolves #206

@MiCKov3r
Copy link
Contributor Author

It occurred to me that I tested this solution for my implementation when I call COCKPIT from PHP.
I'll do some more tests when calling via API :)

@MiCKov3r
Copy link
Contributor Author

MAINTENANCE mode now accepts READ permissions and the ADMIN role still has full access

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE]: "maintenance mode"

1 participant